import VueRouter from "vue-router"
import Index from "./components/Index"

const routes = [
//     一级路由
    {
        path: '/index',
        name: 'index',
        component: Index,
        //     路由嵌套
        children: [
            {path: '/index/menu1', component: () => import('../vue/users.vue')},
            {path: '/index/menu2', component: () => import('../vue/main.vue')}
        ]
    }

]

const router = new VueRouter({
    mode: 'history',
    routes
})

export default router;